package com.scf.fruit.business.user.controller;

import com.scf.fruit.business.user.bo.UserBo;
import com.scf.fruit.configuration.web.LoginValid;
import com.scf.fruit.util.ResponseVo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * @author : 孙超飞
 * @title :
 * @description :
 * @copyright :
 * @date : 2018-05-22 14:43
 */
@RestController
@RequestMapping(value = "/user",produces = "application/json")
public class UserController {
    @Resource
    private UserBo userBo;

    @RequestMapping(value = "/queryUserInfo",method = RequestMethod.GET)
    @LoginValid
    public ResponseVo queryUserInfo(HttpServletRequest request){

        return userBo.queryUserInfo( Long.valueOf(request.getHeader("USERID")));
    }
}
